/*    */ package com.qmsk.business.order.orderMain.dao;
/*    */ 
/*    */ import com.qmsk.business.sys.basic.SupportDAO;
/*    */ import com.utils.basic.MapUtils;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import java.sql.SQLException;
/*    */ import java.util.Date;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import org.springframework.stereotype.Repository;
/*    */ 
/*    */ @Repository
/*    */ public class OrderMainDao extends SupportDAO
/*    */ {
/*    */   public GsonEbRst getGsonOfAll(Map<String, Object> params, Integer nPageIdx, Short nPageSize)
/*    */     throws SQLException
/*    */   {
/* 20 */     if (nPageIdx.intValue() > 0) {
/* 21 */       nPageIdx = Integer.valueOf(nPageIdx.intValue() - 1);
/*    */     }
/* 23 */     return getGsonOfParams("selectSqlOfAll", params, nPageIdx, 
/* 24 */       nPageSize, true);
/*    */   }
/*    */ 
/*    */   public Long getExistOrdeMainId(String openId)
/*    */   {
/* 34 */     return null;
/*    */   }
/*    */ 
/*    */   public GsonEbRst getGsonOfAll(Map<String, Object> params) throws SQLException
/*    */   {
/* 39 */     return getGsonOfParams("selectSqlOfAll", params, false);
/*    */   }
/*    */ 
/*    */   public Integer getCheckBarCode(String barCode) throws SQLException {
/* 43 */     Map params = new HashMap();
/* 44 */     MapUtils.addToMap(params, "barCode", barCode);
/* 45 */     return queryForInt("selectChcekBarCode", params, Integer.valueOf(0));
/*    */   }
/*    */ 
/*    */   public Long isExsitOrderMain(Long custId, String openId, Long shopId) throws SQLException
/*    */   {
/* 50 */     Map params = new HashMap();
/* 51 */     params.put("customerID", custId);
/* 52 */     params.put("openId", openId);
/* 53 */     params.put("shopId", shopId);
/* 54 */     params.put("orderStatus", Integer.valueOf(0));
/* 55 */     params.put("orderEndTime", new Date());
/* 56 */     return queryForLong("isExsitOrderMain", params, Long.valueOf(0L));
/*    */   }
/*    */ 
/*    */   public void updateMoney(Long id, Double money) throws SQLException {
/* 60 */     Map params = new HashMap();
/* 61 */     params.put("id", id);
/* 62 */     params.put("money", money);
/* 63 */     update("updateMoney", params);
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.order.orderMain.dao.OrderMainDao
 * JD-Core Version:    0.5.3
 */